@extends('dashboard.base')

@section('content')
<div class="card-header"><a href="{{route('admin.categories.create')}}" class="btn btn-square  btn-info active">添加分类</a></div>
<table class="table table-responsive-sm">
      <thead>
        <tr>
          <th>分类名称</th>
          <th>图标</th>
         
          <th>排序</th>
          <th>商品数量</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        @foreach($datas as $v)
          @component('dashboard.components.category',['data' => $v])
            @foreach($v->subcates as $v1)
               @component('dashboard.components.category',['data' => $v1]) @endcomponent
            @endforeach
          @endcomponent
        @endforeach
      </tbody>
    </table>
@endsection